package question1;


public class ChocolateTest extends junit.framework.TestCase{
	private question1.Chocolate choco;
	private question1.Decaf decaf;

/*There were 3 failures: 
 * 1) test_Whip_Mocha_Soy_HouseBlend_toString(question1): House Blend Coffee, Soy, Mocha, Whip $1.34 est attendu ??? 
 * 2) test_BeetSugar_Mocha_Soy_Whip_Chocolate_toString(question1): Chocolate, Whip, Soy, Mocha, Beet Sugar $2.65 est attendu ??? 
 * 3) test_BeetSugar_Whip_Mocha_Soy_HouseBlend_toString(question1): House Blend Coffee, Soy, Mocha, Whip, Beet Sugar $1.44 est attendu ???*/


	public void setUp(){
		choco = new question1.Chocolate();
		decaf = new question1.Decaf();
	}

	
	
 	public void testChocolate(){
 		assertEquals(2.1, choco.cost(), 0.1);
 		System.out.println(choco.toString());
 	}
 
 	public void testChocolateWhip(){
 		question1.Beverage chocoSimpleWhip = new Whip(choco); // � compl�ter
 
 		assertEquals(2.2, chocoSimpleWhip.cost(), 0.01);
 		System.out.println(chocoSimpleWhip.toString());
 	}
 	
 	public void testChocolateWhipWhip(){
 		question1.Beverage chocoDoubleWhip = new Whip(new Whip(choco)); // � compl�ter
 
 		assertEquals(2.3, chocoDoubleWhip.cost(), 0.01);
 		System.out.println(chocoDoubleWhip.toString());
 	}
 	
 	public void testChocolateWhipSoyMocha(){
 		question1.Beverage chocoWhipSoyMocha = new Mocha(new Soy(new Whip(choco))); // � compl�ter
 
 		assertEquals(2.55, chocoWhipSoyMocha.cost(), 0.01);
 		System.out.println(chocoWhipSoyMocha.toString());
 	}
	

	
	public void testDecaf(){
		question1.Beverage decafMilk = new Milk(decaf);
		
		assertEquals(1.15, decafMilk.cost(), 0.01);
 		System.out.println(decafMilk.toString());
	}

	
}

